//
//  ProjectProblemListLine.m
//  nova
//
//  Created by user on 11/08/08.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "ProjectProblemListLine.h"


@implementation ProjectProblemListLine



@synthesize problemName;
@synthesize problemIcon;
@synthesize problemLabel;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
		
		problemIcon = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, 32, 32)];
		
		
		problemLabel = [[UILabel alloc] initWithFrame:CGRectMake(42, 0, 288, 30) ];
		problemLabel.numberOfLines = 1;
		problemLabel.font = [UIFont boldSystemFontOfSize: 15.0];
		problemLabel.textColor = [UIColor blackColor];		
		problemLabel.text = problemName;
		problemLabel.backgroundColor = [UIColor clearColor];
		
		[self.contentView addSubview:problemIcon ];		
		[self.contentView addSubview:problemLabel ];			
		
    }
    return self;
}

- (void) setProblem{
	problemIcon.image = [UIImage imageNamed:@"problemsShadow.png"];//[[UIImageView alloc] initWithImage:];	
}

- (void) setAdd{
	[problemLabel setBounds:CGRectMake(140, 5, 180, 32)];
	problemIcon.image = [UIImage imageNamed:@"addButton.png"];//[[UIImageView alloc] initWithImage:];	
}


- (void) setProblemName : (NSString *) name{
	problemName = name;
	problemLabel.text = problemName;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state.
}


- (void)dealloc {
    [super dealloc];
}


@end
